POV-Ray : Newsgroups : povray.general : POVRay Script Failure (Exit 11) : Re: POVRay Script Failure (Exit 11) Server Time
5 Aug 2024 14:19:52 EDT (-0400)
  Re: POVRay Script Failure (Exit 11)  
From: Simon Andrews
Date: 10 Sep 2002 11:54:26
Message: <3D7E15B2.BC810596@bbsrc.ac.uk>
> Simon Andrews wrote:
> >
> > [...]
> >
> > The bit of (Perl) code I'm working with is:
> >
> > if (system("/usr/local/bin/povray +V +Iinput.pov +FP -D +W640 +H480")){
> >
> >   die "POV-Ray failed to execute with exit $?";
> >
> > }
> >
> > ..and this produces only
> >
> > "POV-Ray failed to execute with exit 11 at /home/andrewss/bin/animate
> > line 26."
> >
> > ..no error message, just an exit status 11, which I can't find
> > documented in the help.
>
> Christoph Hormann wrote:
> 
> That's obviously a problem of your script and not of POV-Ray.  You can add
> '+gafile.txt as an option to generate a text file with all the text output
> from POV-Ray.
>

Cheers for the reply and suggestion, but I'm afraid adding that switch
(which I had also tried) didn't help any.  The problem isn't with the
script per-se, as I can run the same script from a shell and it all goes
OK.  It's only when the script is called from the environment of a web
server that it falls over (quietly!).

Actually a bit more playing has located a work-round, and I don't think
the original problem was my fault ;-)

What I've found is that povray, when called with *any* command line
switches (including +gafile), will silently die if the DISPLAY
environment variable is not set (which it isn't in a CGI script).  If I
manually set that variable to some arbitrary number (which isn't used),
then povray suddenly bursts back into life, and does all of its
processing as expected.  Interestingly povray will work without this
variable if you don't call it with any switches at all.

Is this behaviour documented?  Is there a good reason for it that I'm
missing? I can't see any need for POV-ray to always have the DISPLAY
variable set, as it can be very useful without it.  Since I was running
POV with the -D flag set (ie no display), I can't see why it would be
required.

Since I've got a work-round for now I'm happy, but this still has the
vague whiff of a bug.  At least an error message warning that DISPLAY
was not set would have been nice to help track down the problem.

	Cheers

	Simon (who's off to play with his auto-generated animations!!)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.